package com.creditease.shield.flow.common.exception;

/**
 * Created by lihaihuo on 2017/4/6.
 */
public class ShieldException extends RuntimeException {

    private static final String ERRCODE_SYSERROR = "-1";

    private static final long serialVersionUID = 9162790206823240806L;
    /**
     * 错误码
     */
    private String errCode;
    /**
     * 错误信息
     */
    private String errMsg;

    public ShieldException(String message, Throwable cause) {
        super(message, cause);
        this.errCode = ERRCODE_SYSERROR;
        this.errMsg = message;
    }

    public ShieldException(String message) {
        super(message);
        this.errCode = ERRCODE_SYSERROR;
        this.errMsg = message;
    }

    public ShieldException(String code, String message) {
        super(message);
        this.errCode = code;
        this.errMsg = message;
    }

    public String getErrCode() {
        return errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }
}
